<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.14"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>PxQueryCache Struct Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
  $(document).ready(initResizable);
/* @license-end */</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="PhysXLogoBlack.png"/></td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.14 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('structPxQueryCache.html','');});
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-attribs">Public Attributes</a> &#124;
<a href="structPxQueryCache-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">PxQueryCache Struct Reference<div class="ingroups"><a class="el" href="group__physics.html">Physics</a></div></div>  </div>
</div><!--header-->
<div class="contents">

<p>single hit cache for scene queries.  
 <a href="structPxQueryCache.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="PxScene_8h_source.html">PxScene.h</a>&gt;</code></p>
<div class="dynheader">
Collaboration diagram for PxQueryCache:</div>
<div class="dyncontent">
<div class="center"><img src="structPxQueryCache__coll__graph.png" border="0" usemap="#PxQueryCache_coll__map" alt="Collaboration graph"/></div>
<map name="PxQueryCache_coll__map" id="PxQueryCache_coll__map">
<area shape="rect" id="node2" href="classPxRigidActor.html" title="PxRigidActor represents a base class shared between dynamic and static rigid bodies in the physics SD..." alt="" coords="5,287,104,313"/>
<area shape="rect" id="node3" href="classPxActor.html" title="PxActor is the base class for the main simulation objects in the physics SDK. " alt="" coords="28,185,97,212"/>
<area shape="rect" id="node4" href="classPxBase.html" title="Base class for objects that can be members of a PxCollection. " alt="" coords="82,109,150,136"/>
<area shape="rect" id="node6" href="classPxShape.html" title="Abstract class for collision shapes. " alt="" coords="112,236,187,263"/>
<area shape="rect" id="node5" href="classPxFlags.html" title="PxFlags\&lt; PxBaseFlag\l::Enum, PxU16 \&gt;" alt="" coords="39,5,193,47"/>
</map>
<center><span class="legend">[<a target="top" href="graph_legend.html">legend</a>]</span></center></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a810ecb74536e940be1719d60aedfd3cd"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__foundation.html#gacb03347b642a2a5bdea1f9b305a6fbec">PX_INLINE</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structPxQueryCache.html#a810ecb74536e940be1719d60aedfd3cd">PxQueryCache</a> ()</td></tr>
<tr class="memdesc:a810ecb74536e940be1719d60aedfd3cd"><td class="mdescLeft">&#160;</td><td class="mdescRight">constructor sets to default  <a href="#a810ecb74536e940be1719d60aedfd3cd">More...</a><br /></td></tr>
<tr class="separator:a810ecb74536e940be1719d60aedfd3cd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aec86c57516de749a1e2b658a8cb5e5bd"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__foundation.html#gacb03347b642a2a5bdea1f9b305a6fbec">PX_INLINE</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structPxQueryCache.html#aec86c57516de749a1e2b658a8cb5e5bd">PxQueryCache</a> (<a class="el" href="classPxShape.html">PxShape</a> *s, <a class="el" href="group__foundation.html#gacce5749db3dcfb916e98c253374264ed">PxU32</a> findex)</td></tr>
<tr class="memdesc:aec86c57516de749a1e2b658a8cb5e5bd"><td class="mdescLeft">&#160;</td><td class="mdescRight">constructor to set properties  <a href="#aec86c57516de749a1e2b658a8cb5e5bd">More...</a><br /></td></tr>
<tr class="separator:aec86c57516de749a1e2b658a8cb5e5bd"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-attribs"></a>
Public Attributes</h2></td></tr>
<tr class="memitem:a8104d15f64ccdecf8f4d31c9bb5af409"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classPxShape.html">PxShape</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structPxQueryCache.html#a8104d15f64ccdecf8f4d31c9bb5af409">shape</a></td></tr>
<tr class="memdesc:a8104d15f64ccdecf8f4d31c9bb5af409"><td class="mdescLeft">&#160;</td><td class="mdescRight">Shape to test for intersection first.  <a href="#a8104d15f64ccdecf8f4d31c9bb5af409">More...</a><br /></td></tr>
<tr class="separator:a8104d15f64ccdecf8f4d31c9bb5af409"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a83f3c62b437087d7fab306d003f383a7"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classPxRigidActor.html">PxRigidActor</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structPxQueryCache.html#a83f3c62b437087d7fab306d003f383a7">actor</a></td></tr>
<tr class="memdesc:a83f3c62b437087d7fab306d003f383a7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Actor to which the shape belongs.  <a href="#a83f3c62b437087d7fab306d003f383a7">More...</a><br /></td></tr>
<tr class="separator:a83f3c62b437087d7fab306d003f383a7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5d0d3a21b50e766b90c903145592cc7c"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__foundation.html#gacce5749db3dcfb916e98c253374264ed">PxU32</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structPxQueryCache.html#a5d0d3a21b50e766b90c903145592cc7c">faceIndex</a></td></tr>
<tr class="memdesc:a5d0d3a21b50e766b90c903145592cc7c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Triangle index to test first - NOT CURRENTLY SUPPORTED.  <a href="#a5d0d3a21b50e766b90c903145592cc7c">More...</a><br /></td></tr>
<tr class="separator:a5d0d3a21b50e766b90c903145592cc7c"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>single hit cache for scene queries. </p>
<p>If a cache object is supplied to a scene query, the cached actor/shape pair is checked for intersection first. </p><dl class="section note"><dt>Note</dt><dd>Filters are not executed for the cached shape. </dd>
<dd>
If intersection is found, the hit is treated as blocking. </dd>
<dd>
Typically actor and shape from the last <a class="el" href="structPxHitCallback.html#a63b2851eaf99b190fc468e00e8d1e55d" title="Holds the closest blocking hit result for the query. Invalid if hasBlock is false. ">PxHitCallback.block</a> query result is used as a cached actor/shape pair. </dd>
<dd>
Using past touching hits as cache will produce incorrect behavior since the cached hit will always be treated as blocking. </dd>
<dd>
Cache is only used if no touch buffer was provided, for single nearest blocking hit queries and queries using eANY_HIT flag. </dd>
<dd>
if non-zero touch buffer was provided, cache will be ignored</dd>
<dd>
It is the user's responsibility to ensure that the shape and actor are valid, so care must be taken when deleting shapes to invalidate cached references.</dd></dl>
<p>The faceIndex field is an additional hint for a mesh or height field which is not currently used.</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classPxScene.html#a7d7dcd877cee092f8b57c67d79982b50" title="Performs a raycast against objects in the scene, returns results in a PxRaycastBuffer object or via a...">PxScene.raycast</a> </dd></dl>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="a810ecb74536e940be1719d60aedfd3cd"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a810ecb74536e940be1719d60aedfd3cd">&#9670;&nbsp;</a></span>PxQueryCache() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__foundation.html#gacb03347b642a2a5bdea1f9b305a6fbec">PX_INLINE</a> PxQueryCache::PxQueryCache </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>constructor sets to default </p>

</div>
</div>
<a id="aec86c57516de749a1e2b658a8cb5e5bd"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aec86c57516de749a1e2b658a8cb5e5bd">&#9670;&nbsp;</a></span>PxQueryCache() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__foundation.html#gacb03347b642a2a5bdea1f9b305a6fbec">PX_INLINE</a> PxQueryCache::PxQueryCache </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classPxShape.html">PxShape</a> *&#160;</td>
          <td class="paramname"><em>s</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__foundation.html#gacce5749db3dcfb916e98c253374264ed">PxU32</a>&#160;</td>
          <td class="paramname"><em>findex</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>constructor to set properties </p>

</div>
</div>
<h2 class="groupheader">Member Data Documentation</h2>
<a id="a83f3c62b437087d7fab306d003f383a7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a83f3c62b437087d7fab306d003f383a7">&#9670;&nbsp;</a></span>actor</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classPxRigidActor.html">PxRigidActor</a>* PxQueryCache::actor</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Actor to which the shape belongs. </p>

</div>
</div>
<a id="a5d0d3a21b50e766b90c903145592cc7c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5d0d3a21b50e766b90c903145592cc7c">&#9670;&nbsp;</a></span>faceIndex</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__foundation.html#gacce5749db3dcfb916e98c253374264ed">PxU32</a> PxQueryCache::faceIndex</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Triangle index to test first - NOT CURRENTLY SUPPORTED. </p>

</div>
</div>
<a id="a8104d15f64ccdecf8f4d31c9bb5af409"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8104d15f64ccdecf8f4d31c9bb5af409">&#9670;&nbsp;</a></span>shape</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classPxShape.html">PxShape</a>* PxQueryCache::shape</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Shape to test for intersection first. </p>

</div>
</div>
<hr/>The documentation for this struct was generated from the following file:<ul>
<li><a class="el" href="PxScene_8h_source.html">PxScene.h</a></li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- HTML footer for doxygen 1.8.14-->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="structPxQueryCache.html">PxQueryCache</a></li>
    <li class="footer">Copyright &copy; 2008-2021 NVIDIA Corporation, 2788 San Tomas Expressway, Santa Clara, CA 95051 U.S.A. All rights reserved. <a href="http://www.nvidia.com ">www.nvidia.com</a></li>
  </ul>
</div>
</body>
</html>
